# _author_ liuxiaowen
# _desc_ 比较列表与字典查找性能
import time
numbers = []
container = {}
for i in range(1, 1000000):
    numbers.append(i)
    container[i] = i

start = time.perf_counter()
i = 1000000 in numbers
end = time.perf_counter()
print("列表消耗时间{}".format(end-start))

start = time.perf_counter()
i = 1000000 in container
end = time.perf_counter()
print("字典消耗时间{}".format(end-start))